
export const berthFilter = {
  add: {
    in: (params) => {
      console.log('add berth = ', params);
      const {
        buildingNo,
        floorNum,
        berthId,
        floorageArea,
        area,
        pid
      } = params;

      return {
        building_no: buildingNo,
        floor_num: floorNum,
        berth_id: berthId,
        floorage_area: floorageArea,
        area,
        project_id: pid
      };
    },
    out: res => res,
  },
  update: {
    in: params => {
      console.log('update berth = ', params);
      const {
        buildingNo,
        floorNum,
        berthId,
        floorageArea,
        area,
        pid,
        id,
      } = params;

      return {
        id,
        building_no: buildingNo,
        floor_num: floorNum,
        berth_id: berthId,
        floorage_area: floorageArea,
        area, 
        project_id: pid
      };
    },
    out: res => res,
  },
  fetch: {
    in: params => params,
    out: res => res,
  },
  remove: {
    in: params => {
      console.log('remove berth = ', params);

      return params;
    },
    out: res => res
  },
}

